package com.bqtv.sport.ui.home

import android.content.Context
import android.content.Intent
import com.bqtv.sport.R
import com.bqtv.sport.app.AppActivity
import com.bqtv.sport.databinding.ActivityLiveDetailBinding
import com.bqtv.sport.ui.home.fragment.LiveDetailMainFragment

class LiveDetailActivity : AppActivity<ActivityLiveDetailBinding>() {
    private lateinit var liveDetailMainFragment: LiveDetailMainFragment
    companion object {
        open var INTENT_ID = "id"
        fun start(context: Context, id: Int) {
            val intent = Intent(context, LiveDetailActivity::class.java)
            intent.putExtra(INTENT_ID, id)
            context.startActivity(intent)
        }
    }

    override fun getViewBinding() = ActivityLiveDetailBinding.inflate(layoutInflater)

    override fun initView() {

    }

    override fun initData() {
        liveDetailMainFragment= LiveDetailMainFragment.newInstance()
        getSupportFragmentManager().beginTransaction().replace(R.id.fl_main, liveDetailMainFragment)
            .commitAllowingStateLoss()

        initListener()
    }

    private fun initListener() {

    }
}